/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-07 13:44:19  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "wwyt_bp_emergency_training_drill")
@SQLDelete(sql = "update wwyt_bp_emergency_training_drill set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql = "update wwyt_bp_emergency_training_drill set DELETE_FLAG = '1' where id= ?")
@Where(clause = "DELETE_FLAG = '0'")

public class BpEmergencyTrainingDrill implements java.io.Serializable {

    // columns START
    // ID，主键
    private Long id;
    // 演练名称
    private String name;
    // 演练编号
    private String code;
    // 预案ID
    private Long planId;
    // 演练地点
    private String drillAddress;
    // 组织部门ID
    private Long departId;
    // 总指挥
    private String commander;
    // 演练开始时间
    private java.util.Date drillTimeStart;
    // 演练结束时间
    private java.util.Date drillTimeEnd;
    // 参与部门和单位
    private String partakeDetail;
    // 实际演练部分
    private String actualDrillPart;
    // 物质准备和人员培训情况
    private String preparationTrainCase;
    // 演练过程描述
    private String drillProcessDesc;
    // 存在的问题
    private String issuesDesc;
    // 改进措施
    private String mendMeasure;
    // 应急预案修改内容
    private String planUpdateContent;
    // 图片附件ID
    private String attachmentId;
    // 创建人
    private Long createBy;
    // 创建时间
    private java.util.Date createTime;
    // 更新人
    private Long updateBy;
    // 更新时间
    private java.util.Date updateTime;
    // 删除标记
    private String deleteFlag;
    // 组织机构代码
    private String orgCode;
    // 租户
    private Long tenentId;
    // columns END

    public void setId(Long value) {
        this.id = value;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    @Column(name = "NAME", length = 100)
    public String getName() {
        return this.name;
    }

    public void setName(String value) {
        this.name = value;
    }

    @Column(name = "CODE", length = 10)
    public String getCode() {
        return this.code;
    }

    public void setCode(String value) {
        this.code = value;
    }

    @Column(name = "PLAN_ID")
    public Long getPlanId() {
        return this.planId;
    }

    public void setPlanId(Long value) {
        this.planId = value;
    }

    @Column(name = "DRILL_ADDRESS", length = 200)
    public String getDrillAddress() {
        return this.drillAddress;
    }

    public void setDrillAddress(String value) {
        this.drillAddress = value;
    }

    @Column(name = "DEPART_ID")
    public Long getDepartId() {
        return this.departId;
    }

    public void setDepartId(Long value) {
        this.departId = value;
    }

    @Column(name = "COMMANDER", length = 100)
    public String getCommander() {
        return this.commander;
    }

    public void setCommander(String value) {
        this.commander = value;
    }

    @Column(name = "DRILL_TIME_START")
    public java.util.Date getDrillTimeStart() {
        return this.drillTimeStart;
    }

    public void setDrillTimeStart(java.util.Date value) {
        this.drillTimeStart = value;
    }

    @Column(name = "DRILL_TIME_END")
    public java.util.Date getDrillTimeEnd() {
        return drillTimeEnd;
    }

    public void setDrillTimeEnd(java.util.Date drillTimeEnd) {
        this.drillTimeEnd = drillTimeEnd;
    }

    @Column(name = "PARTAKE_DETAIL", length = 500)
    public String getPartakeDetail() {
        return this.partakeDetail;
    }

    public void setPartakeDetail(String value) {
        this.partakeDetail = value;
    }

    @Column(name = "ACTUAL_DRILL_PART", length = 500)
    public String getActualDrillPart() {
        return this.actualDrillPart;
    }

    public void setActualDrillPart(String value) {
        this.actualDrillPart = value;
    }

    @Column(name = "PREPARATION_TRAIN_CASE", length = 500)
    public String getPreparationTrainCase() {
        return this.preparationTrainCase;
    }

    public void setPreparationTrainCase(String value) {
        this.preparationTrainCase = value;
    }

    @Column(name = "DRILL_PROCESS_DESC", length = 500)
    public String getDrillProcessDesc() {
        return this.drillProcessDesc;
    }

    public void setDrillProcessDesc(String value) {
        this.drillProcessDesc = value;
    }

    @Column(name = "ISSUES_DESC", length = 500)
    public String getIssuesDesc() {
        return this.issuesDesc;
    }

    public void setIssuesDesc(String value) {
        this.issuesDesc = value;
    }

    @Column(name = "MEND_MEASURE", length = 500)
    public String getMendMeasure() {
        return this.mendMeasure;
    }

    public void setMendMeasure(String value) {
        this.mendMeasure = value;
    }

    @Column(name = "PLAN_UPDATE_CONTENT", length = 500)
    public String getPlanUpdateContent() {
        return this.planUpdateContent;
    }

    public void setPlanUpdateContent(String value) {
        this.planUpdateContent = value;
    }

    @Column(name = "ATTACHMENT_ID")
    public String getAttachmentId() {
        return this.attachmentId;
    }

    public void setAttachmentId(String value) {
        this.attachmentId = value;
    }

    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public Long getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(Long value) {
        this.createBy = value;
    }

    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }

    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public Long getUpdateBy() {
        return this.updateBy;
    }

    public void setUpdateBy(Long value) {
        this.updateBy = value;
    }

    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }

    @Column(name = "DELETE_FLAG", length = 2)
    public String getDeleteFlag() {
        return this.deleteFlag;
    }

    public void setDeleteFlag(String value) {
        this.deleteFlag = value;
    }

    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String value) {
        this.orgCode = value;
    }

    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }

    public void setTenentId(Long value) {
        this.tenentId = value;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("name", getName())
                .append("code", getCode()).append("planId", getPlanId()).append("drillAddress", getDrillAddress())
                .append("departId", getDepartId()).append("commander", getCommander())
                .append("drillTime", getDrillTimeStart()).append("partakeDetail", getPartakeDetail())
                .append("actualDrillPart", getActualDrillPart())
                .append("preparationTrainCase", getPreparationTrainCase())
                .append("drillProcessDesc", getDrillProcessDesc()).append("issuesDesc", getIssuesDesc())
                .append("mendMeasure", getMendMeasure()).append("planUpdateContent", getPlanUpdateContent())
                .append("attachmentId", getAttachmentId()).append("createBy", getCreateBy())
                .append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime()).append("deleteFlag", getDeleteFlag())
                .append("orgCode", getOrgCode()).append("tenentId", getTenentId()).toString();
    }

    public int hashCode() {
        return new HashCodeBuilder().append(getId()).toHashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof BpEmergencyTrainingDrill == false)
            return false;
        if (this == obj)
            return true;
        BpEmergencyTrainingDrill other = (BpEmergencyTrainingDrill) obj;
        return new EqualsBuilder().append(getId(), other.getId()).isEquals();
    }
}
